/*
 * @Author       : wfl
 * @LastEditors  : wfl
 * @description  :
 * @updateInfo   :
 * @Date         : 2023-02-28 11:45:50
 * @LastEditTime : 2023-03-21 18:17:09
 */
import { ikHttp, textHeader } from '@g/api/request'

export const roleApi = {
  // 获取所有权限
  getRoleList: async () => await ikHttp.post('/server/system/role/list/all'),
  // 添加
  addRole: async (params: any) => await ikHttp.post('/server/system/role/add', params),
  // 更新
  updateRole: async (params: any) => await ikHttp.post('/server/system/role/update', params),
  // 删除
  deleteRole: async (roleId: any) => await ikHttp.post('/server/system/role/delete', roleId, textHeader),
  // 获取角色下菜单、按钮
  getRoleMenus: async (roleId: any) => await ikHttp.post('/server/system/menu/list/role-id', roleId, textHeader),
  // 更新角色下菜单、按钮
  updateRoleMenus: async (params: any) => await ikHttp.post('/server/system/role/menu/update', params)
}
